package com.imelite.qyh.service;

import com.imelite.qyh.base.result.ResultBean;
import com.imelite.qyh.base.result.ResultBeanFactory;
import com.imelite.qyh.dao.EliteCRMView_OrgUserMapper;
import com.imelite.qyh.dao.OrgEmployeeMapper;
import com.imelite.qyh.model.EliteCRMView_OrgUser;
import com.imelite.qyh.model.OrgEmployee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EliteCRMView_OrgUserService {
    @Autowired
    private EliteCRMView_OrgUserMapper eliteCRMView_orgUserMapper;
    @Autowired
    private OrgEmployeeMapper orgEmployeeMapper;

    public EliteCRMView_OrgUser selectByWxcode(String wxcode){
        return eliteCRMView_orgUserMapper.selectByWxcode(wxcode);
    }

    public ResultBean update(OrgEmployee orgEmployee){
        orgEmployeeMapper.updateByPrimaryKeySelective(orgEmployee);
        return ResultBeanFactory.getResultBeanSuccess();
    }

    public List<EliteCRMView_OrgUser> selectByForm(EliteCRMView_OrgUser  user){
        return eliteCRMView_orgUserMapper.selectByForm(user);
    }

    public List<EliteCRMView_OrgUser> selectBySC_CD(String iddep){
        return eliteCRMView_orgUserMapper.selectBySC_CD(iddep);
    }
}
